/**
 * This is a Box class that is one of the children of Package. It has a few basic methods like an expicit and default 
 * value constructors along with toString() and getPackageType().
 * This class does everything it needs to create a Box, with all the needes variables.
 *
 * <p><b>
 * Extra Credit:
 * </b><pre>
 * No extra credit was offered on this assignment
 * </pre><b>
 *
 * History:
 * </b><pre>
 * 5/04/2007 started writing the program
 * 5/08/2007 continued working on it
 * 5/09/2007 finished writing the program
 * </pre>
 *
 * @author  Veniamin Kozubenko
 * @see     "No Borrowed Code" 
 *     	
 */
public class Box extends Package 
{
	private int _length;
	private int _width;
	private int _height;
	
	public Box()
	{ } // End default value constructor
		
	public Box(int trackingNumber, int weight, int length, int width, int height)
	{
		super(trackingNumber, weight);
		_length = length;
		_width = width;
		_height = height;
	} // End explicit value constructor
	

	public String getPackageType()
	{ return "box"; } // End method getPackagetype()
	
	public String toString()
	{
		String temp;
		temp = "\n\nPackage Type: box\n";
		temp += super.toString();
		temp += "\nWeight: ";
		if (super.getWeight() > 1)
			temp += super.getWeight() + " pounds";
		else 
			temp += super.getWeight() + " pound";
		if (_length > 1)
			temp += "\nLength: " + _length + " inches";
		else 
			temp += "\nLength: " + _length + " inch";
		if (_width > 1)
			temp += "\nWidth: " + _width + " inches";
		else 
			temp += "\nWidth: " + _width + " inch";
		if (_height > 1)
			temp += "\nHeight: " + _height + " inches";
		else 
			temp += "\nHeight: " + _height + " inch";
		return temp;

	} // End toString method
} // End class Truck